﻿@{  
    ViewData.TemplateInfo.HtmlFieldPrefix = ViewData.TemplateInfo.HtmlFieldPrefix.Replace(ViewData.ModelMetadata.PropertyName, "").Trim('.');
    var propertyName = ViewData["name"] == null ? ViewData.ModelMetadata.PropertyName : ViewData["name"].ToString(); 
}
<p class="field">
    @if (IsSectionDefined("Label"))
    { 
        @RenderSection("Label", false)
    }
    else
    { 
        <label for="@ViewData.TemplateInfo.GetFullHtmlFieldId(propertyName)">
            @ViewData.ModelMetadata.GetDisplayName()</label>
        if (!string.IsNullOrEmpty(ViewData.ModelMetadata.Description))
        {
        <a href="#" class="tooltip-link" title="@ViewData.ModelMetadata.Description.Localize()">
        </a>
        }
    }
    @RenderBody()
</p>
